package com.chooir.Exceptions;

import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;

public class MyExceptionMapper implements ExceptionMapper<MyException> {

	@Override
	public Response toResponse(MyException exception) {
		return Response.status(Response.Status.NOT_FOUND)
	              .entity(exception.getMessage())
	              .type("text/plain").build();
	}

}
